[?php

/**
 * <?php echo $this->getModuleName() ?> module configuration.
 *
 * @package    ##PROJECT_NAME##
 * @subpackage <?php echo $this->getModuleName()."\n" ?>
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id: helper.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class Base<?php echo ucfirst($this->getModuleName()) ?>GeneratorHelper extends sfModelGeneratorHelper
{
  public function getUrlForAction($action)
  {
    return 'list' == $action ? '<?php echo $this->params['route_prefix'] ?>' : '<?php echo $this->params['route_prefix'] ?>_'.$action;
  }
  public function linkToEdit($object, $params)
    {
        
        return '&lt;li class="ui-grid-row-action-edit">' . link_to(__(image_tag('icons/edit-12.png'), array(), 'sf_admin'), $this->getUrlForAction('edit'), null, array('class' => 'ui-button-edit-12')) . '&lt;/li>';
          
    }
  public function linkToFormList($params)
    {
        
        return link_to(__('Zurück', array(), 'sf_admin'), $this->getUrlForAction('index'), null, array('class' => 'ui-button-back-list')) . '&lt;/li>';
          
    }
    public function linkToFormSave($object, $params)	  
    {

        return '<input class="ui-submit" type="submit" value="'.__($params['label'], array(), 'sf_admin').'" />';

    }

    public function linkToDelete($object, $params)
    {
        
        if ($object->isNew())
        {
            return '';
        }
        return link_to(__(image_tag('icons/delete-12.png'), array(), 'sf_admin'), $this->getUrlForAction('delete'), $object, array('class' => 'ui-button-delete-12', 'method' => 'delete', 'confirm' => !empty($params['confirm']) ? __($params['confirm'], array(), 'sf_admin') : $params['confirm']));
      
    }
}
